package objbo.xmlparser.model.modeler;

import org.dom4j.Element;

import objbo.xmlparser.model.bean.NextSubTreeElementBean;

public class NextElementListModeler
{
	NextSubTreeElementBean nextTreeElementBean = null;
	
	public NextElementListModeler()
	{
		this.nextTreeElementBean = new NextSubTreeElementBean();
	}

	public NextSubTreeElementBean getNextTreeElementBean()
	{
		return this.nextTreeElementBean;
	}

	public void setNextTreeElementBean(NextSubTreeElementBean nextTreeElementBean)
	{
		this.nextTreeElementBean = nextTreeElementBean;
	}
	
	public boolean loadSubElement(Element subElement, int index)
	{
		boolean isDone = false;
		
		if(subElement != null)
		{
			this.nextTreeElementBean.setName(subElement.getName());
			this.nextTreeElementBean.setPath(subElement.getPath());
			this.nextTreeElementBean.setIndex(index);
			isDone = true;
		}

		return isDone;
	}
	
	
	
}
